package main

import "fmt"

// 定义结构体
type Student6 struct {
	id      int
	name    string
	age     int
	gender  string //字符类型
	address string
}

func main() {
	// 声明结构体map
	var m = make(map[int]Student6, 1)
	// 添加数据
	m[0] = Student6{1, "zhangsan", 22, "male", "beijing"}
	m[1] = Student6{2, "lisi", 22, "male", "beijing"}
	m[2] = Student6{3, "wangwu", 22, "male", "beijing"}

	// 打印
	fmt.Println(m)

	// 遍历
	fmt.Println("-----------------------")
	for _, student := range m {
		fmt.Println(student)
	}
}
